<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SMTP::Send()</title>
<style>
body, pre {
	font-family: Verdana;
	font-size: 10pt;
}
a {	color: blue; text-decoration: none }
a:hover { text-decoration: underline }
</style>
</head>
<body bgcolor="#f1f3f5" topmargin="10" leftmargin="14">

<pre>
<hr color="white">
SMTP :: <i>boolean</i> <b>send</b> ( <i>resource</i> connection, <i>array</i> addresses, <i>string</i> message [, <i>string</i> from ] )
<hr>
Return TRUE if the message has been successfully sent, FALSE if not.

<i>array</i> addresses and <i>string</i> from format is "localpart@domainpart.tld".
<i>string</i> message format must be in conformity with the <a href="http://www.faqs.org/rfcs/rfc2822.html" target="_blank">RFC2822</a>.

The SMTP command "RCPT TO" is sent for each mail address from <i>array</i> addresses.
The SMTP command "MAIL FROM" is sent for <i>string</i> from mail address.

Example:
<table border="0" bgcolor="white">
<tr><td>
<pre><code>
// standard mail message RFC2822
$m = 'From: me@myaddress.tld'."\n".
     'To: client@destination.tld'."\n".
     'Subject: Hello World!'."\n".
     'Content-Type: text/plain'."\n\n".
     'Text message.';

// connect to 'destination.tld' MX zone
$c = SMTP::MXconnect('destination.tld') or die(print_r($_RESULT));

// send mail
$s = SMTP::Send($c, array('client@destination.tld'), $m, 'me@myaddress.tld');

// print result
if ($s) echo 'Sent !';
else print_r($_RESULT);
</code></pre>
</td></tr>
</table>

<hr color="white">

See Also: <a href="connect.html">SMTP::Connect()</a>, <a href="mxconnect.html">SMTP::MXconnect()</a>

[ <a href="mail&#116;&#111;:contact&#064;xpertmailer.com?subject=Comment SMTP Send">Comments</a> ]

Last update: Sunday, June 24, 2007

<hr>
</pre>

</body>
</html>